# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>

pkgname=libpqxx
pkgver=5.1.0
pkgrel=1
pkgdesc='C++ client API for PostgreSQL'
url='http://pqxx.org/development/libpqxx/'
arch=('i686' 'x86_64')
license=('custom')
depends=('postgresql-libs>=9.1')
makedepends=('python2' 'xmlto' 'doxygen')
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/jtv/libpqxx/archive/${pkgver}.tar.gz)
sha256sums=('c94c8796e3e82f3dda8e8d39b767bc45e95e1cb6e32d03d7fbf71b3e3bd9edd5')
sha512sums=('4e881bb509b36b6b48d18dddd0895ab6864ba0430630d3e1417036ff8ff0008b446467868f2672e0b49b46cc3a86c6a61a8a3e5c6b63e0bf422be3268d7f9702')

prepare() {
  cd ${pkgname}-${pkgver}
  sed 's|python|python2|' -i tools/splitconfig
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr --enable-shared
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make prefix="${pkgdir}/usr" install
  install -Dm 644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

# vim: ts=2 sw=2 et:
